<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<title>余额记录</title>
		<link rel="stylesheet" href="__AGENT__/css/iconfont.css" />
		<link rel="stylesheet" href="__AGENT__/css/css.css" />
	</head>

	<body>
		{include file="public/header" /}
		<div class="index_conbox">
			<div class="index_content clearfix">
				{include file="public/lefter" /}
				<div class="right">
					<!--右侧内容-->
					<div class="rigtop">
						<span class="title">余额记录</span>
					</div>
					<div class="indrig_con">
						<div class="zizh_conbox" style="padding-top: 20px;">
							<!--选项卡内容开始-->
							<div class="zizh_con_1">
								<form id="my_form" action="{:url('index/yue_record')}" method="post">
									<div class="shxx_row clearfix">
										<div class="left">日期：</div>
										<div class="right clearfix">
											<div class="layui-inline">
												<div class="layui-input-inline">
													<input type="text" class="layui-input" name="begin_time" id="begin_time" placeholder="yyyy年MM月dd日">
												</div>
											</div>
											<i class="chax_line"></i>
											<div class="layui-inline">
												<div class="layui-input-inline">
													<input type="text" class="layui-input" name="end_time" id="end_time" placeholder="yyyy年MM月dd日">
												</div>
											</div>
										</div>
										<button type="submit" onclick="return check_time()" class="htcxbtn">查询</button>
									</div>
								</form>
								<div class="chax_conbox">
									<div class="chax_jiegnr">
										<table class="zizh_table1 zizh_table2">
											<thead>
												<tr>
													<th>日期</th>
													<th>类型</th>
													<th>金额</th>
													<th>明细</th>
												</tr>
											</thead>
											<tbody id="tbody">
												{volist name="list" id="vo" empty="$empty"}
												<tr>
													<td>{$vo.add_time}</td>
													<td>
														{switch name="$vo.order_type"} 
															{case value="1"}订单{/case} 
															{case value="2"}订单退款{/case} 
															{case value="3"}扫码支付{/case} 
															{case value="4"}扫码退款{/case} 
															{case value="5"}提现{/case} 
															{case value="6"}兑现鼓励金{/case} 
															{case value="7"}充值广告费{/case} 
															{case value="8"}扣广告费{/case}
															{case value="9"}线下收银{/case} 
															{default /}订单 
														{/switch}
													</td>
													<td>
														{$vo.balance}
													</td>
													<td>
														{$vo.message}
													</td>
												</tr>
												{/volist}
											</tbody>
										</table>
										<div class="fenye" style="display: block;">
											{$list->render()}
										</div>
									</div>
								</div>
							</div>
						</div>

					</div>
				</div>
			</div>
		</div>
		{include file="public/footer" /}

	</body>

</html>
<script>
	layui.use('laydate', function() {
			var laydate = layui.laydate;

			//日期控件
			laydate.render({
				elem: '#begin_time',
				type: 'datetime',
				format: 'yyyy-MM-dd HH:mm:ss'
			});

			laydate.render({
				elem: '#end_time',
				type: 'datetime',
				format: 'yyyy-MM-dd HH:mm:ss'
			});
		})
		//时间区间
	function check_time() {
		var begin_time = $('#begin_time').val();
		var end_time = $('#end_time').val();
		if(begin_time.length > 2 || end_time.length > 2) {

			if(begin_time.length < 2 || end_time.length < 2) {
				layer.msg("请输入查询时间区间");
				return false;
			}

		}
	}
</script>